<%@ page language="java"  pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>

<%@ include file="/_taglib.jsp" %>

<%@ include file="/_navbar.jsp" %>
<section class="content">
	<div class="container" id="data-container">
		<div class="col-md-11">
			<form class="required-validate" role="form" action="tbox/tboxDevice/save" method="post" onsubmit="return ajaxFormSubmit(this,'tbox/tboxDevice/list')">

				<input type="hidden" "tboxDevice__id" name="tboxDevice.id" value="${tboxDevice.id}">
				<!-- general form elements disabled -->
				<div class="box">
					<div class="box-body">


							<div class="form-group" style="display:inline-block;">
								<label>设备标识号SN</label> 
								<input type="text" class="form-control {required:true, minlength:2}" style="width:260px"
									id="tboxDevice__sn"
									name="tboxDevice.sn" 
									value="${tboxDevice.sn}"
									placeholder="Enter ...">
							</div>
							<div class="form-group" style="display:inline-block;">
								<label>IMSI号码</label> 
								<input type="text" class="form-control {required:true, minlength:2}" style="width:200px"
									id="tboxDevice__imsi"
									name="tboxDevice.imsi" 
									value="${tboxDevice.imsi}"
									placeholder="Enter ...">
							</div>
							<div class="form-group" style="display:inline-block;">
								<label>SIM卡号码</label> 
								<input type="text" class="form-control {required:true, minlength:2}" style="width:150px"
									id="tboxDevice__sim"
									name="tboxDevice.sim" 
									value="${tboxDevice.sim}"
									placeholder="Enter ...">
							</div>
							<div class="form-group" style="display:inline-block;">
								<label>车辆VIN码</label> 
								<input type="text" class="form-control {required:true, minlength:2}" style="width:200px"
									id="tboxDevice__vin"
									name="tboxDevice.vin" 
									value="${tboxDevice.vin}"
									placeholder="Enter ...">
							</div>
							<div class="form-group" style="display:inline-block;">
								<label>车牌号码</label> 
								<input type="text" class="form-control {required:true, minlength:2}" style="width:200px"
									id="tboxDevice__vPlate"
									name="tboxDevice.vPlate" 
									value="${tboxDevice.vPlate}"
									placeholder="Enter ...">
							</div>
							<div class="form-group" style="display:inline-block;">
								<label>车主姓名</label> 
								<input type="text" class="form-control {required:true, minlength:2}" style="width:200px"
									id="tboxDevice__vUser"
									name="tboxDevice.vUser" 
									value="${tboxDevice.vUser}"
									placeholder="Enter ...">
							</div>
							<div class="form-group" style="display:inline-block;">
								<label>紧急联系电话</label> 
								<input type="text" class="form-control {required:true, minlength:2}" style="width:200px"
									id="tboxDevice__vEcall"
									name="tboxDevice.vEcall" 
									value="${tboxDevice.vEcall}"
									placeholder="Enter ...">
							</div>
							<div class="form-group" style="display:inline-block;">
								<label>激活状态</label> 
								<j:select dictType="TBoxActiveStatus" id="tboxDevice.activeStatus" name="tboxDevice.activeStatus" label="激活状态"/>
							</div>
							


					</div>					<!-- /.box-body -->
					<div class="box-footer" align="center">
						<button type="submit" class="btn btn-primary"
							style="postion: absolute; left: 45%;">保存</button>
					</div>
				</div>				<!-- /.box -->
			</form>
		</div>
	</div>
</section>


<%  
//    String path = request.getContextPath();  
//    String basePath = request.getScheme() + "://"  
//            + request.getServerName() + ":" + request.getServerPort()  
//            + path + "/";  
%> 

<%@ include file="/_edit_js.jsp" %>

<SCRIPT type="text/javascript">
	$(function (){
		kedit("user__remark");
		
		//有头像则，显示头像
		if ("${user.picture}" != null && "${user.picture}" != ""){
			$('#img-pic').attr('src','${user.picture}');
		}
	});
	
	function initPassword(userId){
		var param = jQuery.parseJSON('{"userId":"'+userId+'"}');
		ajaxPost('sys/user/initPassword',param);
	}
</SCRIPT>

